import { request } from '@/utils'

export default {
    login: (data) => request.post('/system/base/access_token', data, { noNeedToken: true }),
    getUserInfo: () => request.get('/system/base/userinfo'),
    getUserMenu: () => request.get('/system/base/usermenu'),
    getUserApi: () => request.get('/system/base/userapi'),
    getWorkbench: () => request.get('/system/base/workbench'),
    // profile
    updatePassword: (data = {}) => request.post('/system/base/update_password', data),
    // users
    getUserList: (params = {}) => request.get('/system/users/list', { params }),
    getUserById: (params = {}) => request.get('/system/users/get', { params }),
    createUser: (data = {}) => request.post('/system/users/create', data),
    updateUser: (data = {}) => request.post('/system/users/update', data),
    deleteUser: (params = {}) => request.delete(`/system/users/delete`, { params }),
    // role
    getRoleList: (params = {}) => request.get('/system/role/list', { params }),
    createRole: (data = {}) => request.post('/system/role/create', data),
    updateRole: (data = {}) => request.post('/system/role/update', data),
    deleteRole: (params = {}) => request.delete('/system/role/delete', { params }),
    updateRoleAuthorized: (data = {}) => request.post('/system/role/authorized', data),
    getRoleAuthorized: (params = {}) => request.get('/system/role/authorized', { params }),
    // menus
    getMenus: (params = {}) => request.get('/system/menu/list', { params }),
    createMenu: (data = {}) => request.post('/system/menu/create', data),
    updateMenu: (data = {}) => request.post('/system/menu/update', data),
    deleteMenu: (params = {}) => request.delete('/system/menu/delete', { params }),
    // apis
    getApis: (params = {}) => request.get('/system/api/list', { params }),
    createApi: (data = {}) => request.post('/system/api/create', data),
    updateApi: (data = {}) => request.post('/system/api/update', data),
    deleteApi: (params = {}) => request.delete('/system/api/delete', { params }),
    refreshApi: (data = {}) => request.post('/system/api/refresh', data),
    // depts
    getDepts: (params = {}) => request.get('/system/dept/list', { params }),
    createDept: (data = {}) => request.post('/system/dept/create', data),
    updateDept: (data = {}) => request.post('/system/dept/update', data),
    deleteDept: (params = {}) => request.delete('/system/dept/delete', { params }),
    getDeptsTree: (params = {}) => request.get('/system/dept/tree', { params }),
    // auditlog
    getAuditLogList: (params = {}) => request.get('/system/auditlog/list', { params }),
    // downloads
    getDownloadsList: (params = {}) => request.get('/system/downloads/list', { params }),
    onDownload: (params = {}) => request.get('/system/downloads/down', { params }),
    getFiles: (params = {}) => request.get('/system/downloads/files', { params }),
    deleteFiles: (params = {}) => request.get('/system/downloads/delete_file', { params }),
    downloadFiles: (params = {}) => request.get('/system/downloads/download_file', { params }),

    // customer
    // customer-users
    getCustomer: (params = {}) => request.get('/customer/users/list', { params }),
    createCustomer: (data = {}) => request.post('/customer/users/create', data),
    updateCustomer: (data = {}) => request.post('/customer/users/update', data),
    deleteCustomer: (params = {}) => request.delete('/customer/users/delete', { params }),
    getCustomerLevel: (params = {}) => request.get('/customer/users/list_level', { params }),
    uploadFile: (params = {}) => request.get('/customer/users/file', { params }),
    getLeves: (params = {}) => request.get('/customer/users/list_down', { params }),
    
    // customer-lever
    getLever: (params = {}) => request.get('/customer/level/list', { params }),
    createLever: (data = {}) => request.post('/customer/level/create', data),
    updateLever: (data = {}) => request.post('/customer/level/update', data),
    deleteLever: (params = {}) => request.delete('/customer/level/delete', { params }),
    // customer-grow
    getGrow: (params = {}) => request.get('/customer/grow/list', { params }),
    createGrow: (data = {}) => request.post('/customer/grow/create', data),
    updateGrow: (data = {}) => request.post('/customer/grow/update', data),
    deleteGrow: (params = {}) => request.delete('/customer/grow/delete', { params }),


    // Category
    getCategory: (params = {}) => request.get('/content/category/list', { params }),
    createCategory: (data = {}) => request.post('/content/category/create', data),
    updateCategory: (data = {}) => request.post('/content/category/update', data),
    deleteCategory: (params = {}) => request.delete('/content/category/delete', { params }),
    getCategoryTree: (params = {}) => request.get('/content/category/tree', { params }),
    // contents
    getContents: (params = {}) => request.get('/content/contents/list', { params }),
    createContents: (data = {}) => request.post('/content/contents/create', data),
    updateContents: (data = {}) => request.post('/content/contents/update', data),
    deleteContents: (params = {}) => request.delete('/content/contents/delete', { params }),
    getContentsById: (params = {}) => request.get('/content/contents/get', { params }),
    uploadFileContent: (params = {}) => request.get('/content/contents/file', { params }),
    uploadFilesContents: (params = {}) => request.get('/content/contents/files', { params }),

    // goods
    //goods-category
    getgoodsCategory: (params = {}) => request.get('/goods/category/list', { params }),
    creategoodsCategory: (data = {}) => request.post('/goods/category/create', data),
    updategoodsCategory: (data = {}) => request.post('/goods/category/update', data),
    deletegoodsCategory: (params = {}) => request.delete('/goods/category/delete', { params }),
    getgoodsCategoryTree: (params = {}) => request.get('/goods/category/tree', { params }),
    getgoodsAttributeOption: (params = {}) => request.get('/goods/attribute/option', { params }),

    //goods-Attribute
    getgoodsAttribute: (params = {}) => request.get('/goods/attribute/list', { params }),
    creategoodsAttribute: (data = {}) => request.post('/goods/attribute/create', data),
    updategoodsAttribute: (data = {}) => request.post('/goods/attribute/update', data),
    deletegoodsAttribute: (params = {}) => request.delete('/goods/attribute/delete', { params }),
    //goods-brand
    getgoodsBrand: (params = {}) => request.get('/goods/brand/list', { params }),
    creategoodsBrand: (data = {}) => request.post('/goods/brand/create', data),
    updategoodsBrand: (data = {}) => request.post('/goods/brand/update', data),
    deletegoodsBrand: (params = {}) => request.delete('/goods/brand/delete', { params }),
    uploadFileBrand: (params = {}) => request.get('/goods/brand/file', { params }),
    //goods-express
    getgoodsExpress: (params = {}) => request.get('/goods/express/list', { params }),
    creategoodsExpress: (data = {}) => request.post('/goods/express/create', data),
    updategoodsExpress: (data = {}) => request.post('/goods/express/update', data),
    deletegoodsExpress: (params = {}) => request.delete('/goods/express/delete', { params }),
    detailgoodsExpress: (params = {}) => request.get('/goods/express/get', { params }),
    //goods-good
    getgoodsGood: (params = {}) => request.get('/goods/goods/list', { params }),
    creategoodsGood: (data = {}) => request.post('/goods/goods/create', data),
    updategoodsGood: (data = {}) => request.post('/goods/goods/update', data),
    deletegoodsGood: (params = {}) => request.delete('/goods/goods/delete', { params }),
    uploadFileGood: (params = {}) => request.get('/goods/goods/file', { params }),
    getgoodsGood_attr: (params = {}) => request.get('/goods/goods/get_attr', { params }),
    detailgoodsGood: (params = {}) => request.get('/goods/goods/get', { params }),
    getallgoods: (params = {}) => request.get('/goods/goods/all', { params }),
    getallgoodssku: (params = {}) => request.get('/goods/goods/goods_sku', { params }),

    getgoodsType: (params = {}) => request.get('/goods/goods/type', { params }),
    getgoodsTypeArray: (params = {}) => request.get('/goods/goods/type_array', { params }),

    // mini
    //minisettings
    getMiniSettings: (params = {}) => request.get('/mini/settings/list', { params }),
    createMiniSettings: (data = {}) => request.post('/mini/settings/create', data),
    updateMiniSettings: (data = {}) => request.post('/mini/settings/update', data),
    deleteMiniSettings: (params = {}) => request.delete('/mini/settings/delete', { params }),
    getMinilogs: (params = {}) => request.get('/mini/auditlog/list', { params }),
    getGoType: (params = {}) => request.get('/mini/settings/go_type', { params }),
    //alert
    getMiniAlert: (params = {}) => request.get('/mini/alert/list', { params }),
    createMiniAlert: (data = {}) => request.post('/mini/alert/create', data),
    updateMiniAlert: (data = {}) => request.post('/mini/alert/update', data),
    deleteMiniAlert: (params = {}) => request.delete('/mini/alert/delete', { params }),
    //layers
    getMiniLayers: (params = {}) => request.get('/mini/layers/list', { params }),
    createMiniLayers: (data = {}) => request.post('/mini/layers/create', data),
    updateMiniLayers: (data = {}) => request.post('/mini/layers/update', data),
    deleteMiniLayers: (params = {}) => request.delete('/mini/layers/delete', { params }),
    getMiniLayersById: (params = {}) => request.get('/mini/layers/get', { params }),

    //topic
    getMiniTopic: (params = {}) => request.get('/mini/topic/list', { params }),
    createMiniTopic: (data = {}) => request.post('/mini/topic/create', data),
    updateMiniTopic: (data = {}) => request.post('/mini/topic/update', data),
    deleteMiniTopic: (params = {}) => request.delete('/mini/topic/delete', { params }),
    getMiniTopicById: (params = {}) => request.get('/mini/topic/get', { params }),

    // appointment
    //settings-space
    getSettingSpace: (params = {}) => request.get('/appointment/space/list', { params }),
    createSettingSpace: (data = {}) => request.post('/appointment/space/create', data),
    updateSettingSpace: (data = {}) => request.post('/appointment/space/update', data),
    deleteSettingSpace: (params = {}) => request.delete('/appointment/space/delete', { params }),
    getSettingSpaceById: (params = {}) => request.get('/appointment/space/get', { params }),
    uploadFileSettingSpace: (params = {}) => request.get('/appointment/space/file', { params }),
    getSettingCity: (params = {}) => request.get('/appointment/space/city', { params }),
    //settings-Project
    getSettingProject: (params = {}) => request.get('/appointment/project/list', { params }),
    createSettingProject: (data = {}) => request.post('/appointment/project/create', data),
    updateSettingProject: (data = {}) => request.post('/appointment/project/update', data),
    deleteSettingProject: (params = {}) => request.delete('/appointment/project/delete', { params }),
    getSettingProjectById: (params = {}) => request.get('/appointment/project/get', { params }),
    getSettingProjectList: (params = {}) => request.get('/appointment/project/project', { params }),
    getSettingProjectTree: (params = {}) => request.get('/appointment/project/tree', { params }),

//instrument
    getSettingInstrument: (params = {}) => request.get('/appointment/instrument/list', { params }),
    createSettingInstrument: (data = {}) => request.post('/appointment/instrument/create', data),
    updateSettingInstrument: (data = {}) => request.post('/appointment/instrument/update', data),
    deleteSettingInstrument: (params = {}) => request.delete('/appointment/instrument/delete', { params }),
    getSettingInstrumentById: (params = {}) => request.get('/appointment/instrument/get', { params }),
    getInstrumentList: (params = {}) => request.get('/appointment/instrument/instrument', { params }),
    getSpaceList: (params = {}) => request.get('/appointment/instrument/space', { params }),


//designer
    getSettingDesigner: (params = {}) => request.get('/appointment/designer/list', { params }),
    createSettingDesigner: (data = {}) => request.post('/appointment/designer/create', data),
    updateSettingDesigner: (data = {}) => request.post('/appointment/designer/update', data),
    deleteSettingDesigner: (params = {}) => request.delete('/appointment/designer/delete', { params }),
    getSettingDesignerById: (params = {}) => request.get('/appointment/designer/get', { params }),
    uploadFileSettingDesigner: (params = {}) => request.get('/appointment/designer/file', { params }),
    getDesignerList: (params = {}) => request.get('/appointment/designer/doctor_type', { params }),
    getDesignerTypeList: (params = {}) => request.get('/appointment/designer/designer_type', { params }),

//appointment_list
    getAppointmentList: (params = {}) => request.get('/appointment/list/list', { params }),
    createAppointmentList: (data = {}) => request.post('/appointment/list/create', data),
    updateAppointmentList: (data = {}) => request.post('/appointment/list/update', data),
    deleteAppointmentList: (params = {}) => request.delete('/appointment/list/delete', { params }),
    getAppointmentListById: (params = {}) => request.get('/appointment/list/get', { params }),
    getAppointmentType: (params = {}) => request.get('/appointment/list/type', { params }),
    onAppointmentExcel: (params = {}) => request.get('/appointment/list/excel', { params }),

     //appointment-category
    getAppointmentCategory: (params = {}) => request.get('/appointment/category/list', { params }),
    createAppointmentCategory: (data = {}) => request.post('/appointment/category/create', data),
    updateAppointmentCategory: (data = {}) => request.post('/appointment/category/update', data),
    deleteAppointmentCategory: (params = {}) => request.delete('/appointment/category/delete', { params }),
    getAppointmentCategoryTree: (params = {}) => request.get('/appointment/category/tree', { params }),
//salon
    getSettingSalon: (params = {}) => request.get('/appointment/salon/list', { params }),
    createSettingSalon: (data = {}) => request.post('/appointment/salon/create', data),
    updateSettingSalon: (data = {}) => request.post('/appointment/salon/update', data),
    deleteSettingSalon: (params = {}) => request.delete('/appointment/salon/delete', { params }),
    getSettingSalonById: (params = {}) => request.get('/appointment/salon/get', { params }),
    uploadFileSettingSalon: (params = {}) => request.get('/appointment/salon/file', { params }),

    //orders
    //list
    getOrdersList: (params = {}) => request.get('/orders/orders/list', { params }),
    getOrdersDDList: (params = {}) => request.get('/orders/orders/dd_list', { params }),
    createOrdersList: (data = {}) => request.post('/orders/orders/create', data),
    updateOrdersList: (data = {}) => request.post('/orders/orders/update', data),
    updateOrdersRefund: (data = {}) => request.post('/orders/orders/refund', data),
    updateOrdersSuccess: (params = {}) => request.get('/orders/orders/success', { params }),
    deleteOrdersList: (params = {}) => request.delete('/orders/orders/delete', { params }),
    getOrdersListById: (params = {}) => request.get('/orders/orders/get', { params }),
    getOrdersType: (params = {}) => request.get('/orders/orders/type', { params }),
    onOrdersExcel: (params = {}) => request.get('/orders/orders/excel', { params }),
    getOrdersAfterList: (params = {}) => request.get('/orders/orders/after_list', { params }),
    updateOrdersListDD: (data = {}) => request.post('/orders/orders/update_dd', data),
    //car
    getOrdersCar: (params = {}) => request.get('/orders/car/list', { params }),
    createOrdersCar: (data = {}) => request.post('/orders/car/create', data),
    updateOrdersCar: (data = {}) => request.post('/orders/car/update', data),
    deleteOrdersCar: (params = {}) => request.delete('/orders/car/delete', { params }),
    getOrdersCarById: (params = {}) => request.get('/orders/car/get', { params }),

    //orders_water
    getOrdersWater: (params = {}) => request.get('/orders/water/list', { params }),

    //order_goods
    getOrdersGoods: (params = {}) => request.get('/orders/goods/list', { params }),
    createOrdersGoods: (data = {}) => request.post('/orders/goods/create', data),
    updateOrdersGoods: (data = {}) => request.post('/orders/goods/update', data),
    deleteOrdersGoods: (params = {}) => request.delete('/orders/goods/delete', { params }),
    getOrdersGoodsById: (params = {}) => request.get('/orders/goods/get', { params }),


    //marketing
    //commission
    getCommission: (params = {}) => request.get('/marketing/commission/list', { params }),
    createCommission: (data = {}) => request.post('/marketing/commission/create', data),
    updateCommission: (data = {}) => request.post('/marketing/commission/update', data),
    deleteCommission: (params = {}) => request.delete('/marketing/commission/delete', { params }),
    getCommissionIncome: (params = {}) => request.get('/marketing/commission/income', { params }),
    updateCommissionMx: (data = {}) => request.post('/marketing/commission/update_mx', data),

    //integral
    getIntegral: (params = {}) => request.get('/marketing/integral/list', { params }),
    createIntegral: (data = {}) => request.post('/marketing/integral/create', data),
    updateIntegral: (data = {}) => request.post('/marketing/integral/update', data),
    deleteIntegral: (params = {}) => request.delete('/marketing/integral/delete', { params }),

    //integral_rule
    getIntegralRule: (params = {}) => request.get('/marketing/integral_rule/list', { params }),
    createIntegralRule: (data = {}) => request.post('/marketing/integral_rule/create', data),
    updateIntegralRule: (data = {}) => request.post('/marketing/integral_rule/update', data),
    deleteIntegralRule: (params = {}) => request.delete('/marketing/integral_rule/delete', { params }),
    getIntegralRuleList: (params = {}) => request.get('/marketing/integral_rule/rules', { params }),

    //lives
    getLives: (params = {}) => request.get('/marketing/lives/list', { params }),
    createLives: (data = {}) => request.post('/marketing/lives/create', data),
    updateLives: (data = {}) => request.post('/marketing/lives/update', data),
    deleteLives: (params = {}) => request.delete('/marketing/lives/delete', { params }),

    //draw
    getDraw: (params = {}) => request.get('/marketing/draw/list', { params }),
    createDraw: (data = {}) => request.post('/marketing/draw/create', data),
    updateDraw: (data = {}) => request.post('/marketing/draw/update', data),
    deleteDraw: (params = {}) => request.delete('/marketing/draw/delete', { params }),

    //draw_rule
    getDrawRule: (params = {}) => request.get('/marketing/draw_rule/list', { params }),
    createDrawRule: (data = {}) => request.post('/marketing/draw_rule/create', data),
    updateDrawRule: (data = {}) => request.post('/marketing/draw_rule/update', data),
    deleteDrawRule: (params = {}) => request.delete('/marketing/draw_rule/delete', { params }),
    getDrawRuleList: (params = {}) => request.get('/marketing/draw_rule/rules', { params }),
    getDrawRuleType: (params = {}) => request.get('/marketing/draw_rule/type', { params }),

    //coupons
    getCoupons: (params = {}) => request.get('/marketing/coupons/list', { params }),
    createCoupons: (data = {}) => request.post('/marketing/coupons/create', data),
    updateCoupons: (data = {}) => request.post('/marketing/coupons/update', data),
    deleteCoupons: (params = {}) => request.delete('/marketing/coupons/delete', { params }),

    //coupons_rule
    getCouponsRule: (params = {}) => request.get('/marketing/coupons_rule/list', { params }),
    createCouponsRule: (data = {}) => request.post('/marketing/coupons_rule/create', data),
    updateCouponsRule: (data = {}) => request.post('/marketing/coupons_rule/update', data),
    deleteCouponsRule: (params = {}) => request.delete('/marketing/coupons_rule/delete', { params }),
    getCouponsRuleList: (params = {}) => request.get('/marketing/coupons_rule/rules', { params }),

    //integral
    getDepositAdd: (params = {}) => request.get('/marketing/deposit/list_add', { params }),
    getDepositDel: (params = {}) => request.get('/marketing/deposit/list_del', { params }),
    createDeposit: (data = {}) => request.post('/marketing/deposit/create', data),
    updateDeposit: (data = {}) => request.post('/marketing/deposit/update', data),
    deleteDeposit: (params = {}) => request.delete('/marketing/deposit/delete', { params }),

    // exam-setting
    getExam: (params = {}) => request.get('/exams/exam/list', { params }),
    createExam: (data = {}) => request.post('/exams/exam/create', data),
    updateExam: (data = {}) => request.post('/exams/exam/update', data),
    deleteExam: (params = {}) => request.delete('/exams/exam/delete', { params }),
    getListExam: (params = {}) => request.get('/exams/exam/list_space', { params }),

    // exam-score
    getExamScore: (params = {}) => request.get('/exams/result/list', { params }),
    createExamScore: (data = {}) => request.post('/exams/result/create', data),
    updateExamScore: (data = {}) => request.post('/exams/result/update', data),
    deleteExamScore: (params = {}) => request.delete('/exams/result/delete', { params }),

    // exam-setting
    getExamPost: (params = {}) => request.get('/exams/user_answer/list', { params }),
    createExamPost: (data = {}) => request.post('/exams/user_answer/create', data),
    updateExamPost: (data = {}) => request.post('/exams/user_answer/update', data),
    deleteExamPost: (params = {}) => request.delete('/exams/user_answer/delete', { params }),

    // jobs
    getJobsRule: (params = {}) => request.get('/jobs/jobs_rule/list', { params }),
    createJobsRule: (data = {}) => request.post('/jobs/jobs_rule/create', data),
    updateJobsRule: (data = {}) => request.post('/jobs/jobs_rule/update', data),
    deleteJobsRule: (params = {}) => request.delete('/jobs/jobs_rule/delete', { params }),
    getJobsRuleType: (params = {}) => request.get('/jobs/jobs_rule/type', { params }),
    getJobsLog: (params = {}) => request.get('/jobs/jobs_log/list', { params }),
    createJobsLog: (data = {}) => request.post('/jobs/jobs_log/create', data),
    updateJobsLog: (data = {}) => request.post('/jobs/jobs_log/update', data),
    deleteJobsLog: (params = {}) => request.delete('/jobs/jobs_log/delete', { params }),
    getJobsRuleList: (params = {}) => request.get('/jobs/jobs_log/jobs_rule', { params }),

    //saas
    getSaasSpaceMap: (params = {}) => request.get('/saas/space/list', { params }),
    getSaasUserList: (params = {}) => request.get('/saas/pay/list', { params }),
    getSaasUserDetail: (params = {}) => request.get('/saas/pay/get', { params }),
    getSaasUserCouponsList: (params = {}) => request.get('/saas/pay/coupons_list', { params }),
    getSaasBucklingList: (params = {}) => request.get('/saas/buckling/list_buckling', { params }),
    createCases: (data = {}) => request.post('/saas/buckling/create', data),
    createPay: (data = {}) => request.post('/saas/pay/create', data),

    // scheduling
    getSchedulingRules: (params = {}) => request.get('/saas/scheduling_rules/list', { params }),
    createSchedulingRules: (data = {}) => request.post('/saas/scheduling_rules/create', data),
    updateSchedulingRules: (data = {}) => request.post('/saas/scheduling_rules/update', data),
    deleteSchedulingRules: (params = {}) => request.delete('/saas/scheduling_rules/delete', { params }),
    getSchedulingDatesWeek: (params = {}) => request.get('/saas/scheduling_dates/get_week', { params }),
    getAllDesigners: (params = {}) => request.get('/saas/scheduling_dates/designers', { params }),
    getSchedulingDates: (params = {}) => request.get('/saas/scheduling_dates/list', { params }),
    createSchedulingDates: (data = {}) => request.post('/saas/scheduling_dates/create', data),
    updateSchedulingDates: (data = {}) => request.post('/saas/scheduling_dates/update', data),
    deleteSchedulingDates: (params = {}) => request.delete('/saas/scheduling_dates/delete', { params }),

    //saas-appointment
    getAllAppointment: (params = {}) => request.get('/saas/appointment/list', { params }),
    get3MonthAppointment: (params = {}) => request.get('/saas/appointment/3month', { params }),
}


